﻿<Serializable()> _
Public Class TipoVestuario
    Inherits BaseDominio

    Private _nome As String
    Public Overridable Property Nome() As String
        Get
            Return _nome
        End Get
        Set(ByVal value As String)
            _nome = value
        End Set
    End Property

#Region "Negocio"

    Public Sub New()
        MyBase.New()
    End Sub

    Public Overridable Function Buscar(ByVal _id As Long) As TipoVestuario
        Return MyBase.TipoVestuarioDao.Buscar(_id)
    End Function

    Public Overridable Sub Salvar()

        If String.IsNullOrEmpty(Me.Nome) Then
            Throw New ArtNoiException("É necessário informar o nome do tipo de vestuário.")
        End If

        MyBase.TipoVestuarioDao.Salvar(Me)

    End Sub

#End Region

End Class